package dao;

import org.apache.ibatis.annotations.Param;
import pojo.RegistrationRecords;

import java.util.List;
import java.util.Map;

public interface RegistrationRecordsDao {

    int deleteByPrimaryKey(Integer id);

    int insert(RegistrationRecords record);

    RegistrationRecords selectByPrimaryKey(Integer id);

    int updateByPrimaryKey(RegistrationRecords record);

    List<RegistrationRecords> selectAllRecords();

    List<RegistrationRecords> selectByDoctorId(@Param("docId") String docId);

    // 日期参数为 String 类型，后续在 XML 中用字符串拼接条件（需注意数据库日期格式匹配）
    List<RegistrationRecords> selectByDate(@Param("day") String day);

    List<Map<String, Object>> countByDepartment();

    // 若该方法是查医生排班，结合前面号源逻辑，可能也需调整日期参数类型，这里先保留，按需改
    List<RegistrationRecords> selectDoctorSchedules();

    List<RegistrationRecords> selectByPatientId(@Param("patientId") String patientId);
    List<RegistrationRecords> selectByDoctorIdAndDays(@Param("docId") String docId, @Param("days") List<String> days);
}